package com.wanshi.feign;

/**
 * @Author: wb
 * @CreateTime: 2023-03-30  09:36
 * @Description:
 */

import com.wanshi.entity.AdminUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

// 和写service 非常的类似, 服务名
@FeignClient(value = "USER-SERVER",fallback = FeignCallback.class)
public interface UserFeign {
//    http://USER-SERVER/admin/getUser/
    //  全部的粘贴 user controller的方法
    @GetMapping("/admin/getadmin/{id}") // delete
//    @GetMapping("/getadmin/{id}") // delete
    public  AdminUser getadmin(@PathVariable("id") String admin_id);


    @GetMapping("/admin/getUser/{id}") // delete
    public  String getUser(@PathVariable("id") String admin_id);
}